/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package UTS.Pengujian;

import UTS.model.Sekretariat;
import UTS.model.Surat;
import UTS.model.SuratTableModel;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import oracle.jdbc.pool.OracleDataSource;

/**
 *
 * @author Vincentius HMK
 */
public class PengujianSuratTableModel {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
         ArrayList<Surat> test1 = new ArrayList<Surat>();
       Surat test11 = new Surat();
        try {
            test11.setNomor("123");
            test11.setPerihal("Surat");
            test11.setAsal("USD");
            test11.setPenerima("Vincent");
            test11.setLetak("Loker");
            test11.setTanggalDiterima(null);
            test11.setStatusSurat("Belum Diterima");
        } catch (Exception ex) {
            Logger.getLogger(PengujianSuratTableModel.class.getName()).log(Level.SEVERE, null,
                    ex);
        }
        Surat test12 = new Surat();
        try {
            test12.setNomor("098");
            test12.setPerihal("Surat");
            test12.setAsal("USD");
            test12.setPenerima("Rendra");
            test12.setLetak("Lemari");
            test12.setTanggalDiterima(null);
            test12.setStatusSurat("Belum Diterima");
        } catch (Exception ex) {
            Logger.getLogger(PengujianSuratTableModel.class.getName()).log(Level.SEVERE, null,
                    ex);
        }
        test1.add(test11);
        test1.add(test12);
        SuratTableModel test2 = new SuratTableModel(test1);
        System.out.println("Nomor :" + test2.getValueAt(0, 0) + " Perihal:" + test2.getValueAt(0, 1));
        System.out.println("Nomor :" + test2.getValueAt(1, 0) + " Perihal:" + test2.getValueAt(1, 1));
    }
}
